//
// Created by 28365 on 2025/3/13.
//

#include "../include/config/proceessing/file/DefaultFileProcessor.h"
#include "../include/exception/FileUnableCreateException.h"

namespace fs = std::filesystem;

File *DefaultFileProcessor::getFile(const string &rootDir, const Res &res) {
    File *result = new File(rootDir + "/" + res.getResPath());
    if (!res.isDelete()){
        if (!result->existsParentDir()){
            result->mkParentDirs();
        }
    }
    return result;
}

DefaultFileProcessor::~DefaultFileProcessor() = default;
